const courseshandle = require('../../routehandle/admin/courseshandle')
const express = require('express');
const router = express.Router();
/* 查询所有课程列表 */
router.get('/', courseshandle.getcourses);
/* 通过用户查询课程列表 */
router.get('/user', courseshandle.getcoursesbyuser);
/* 通过分类查询课程列表 */
router.get('/category/:id', courseshandle.getcoursesbycategory);
/* 查询课程详情 */
router.get('/:id', courseshandle.getcoursesdetail);
/* 新增课程数据 */
router.post('/', courseshandle.addcourses);
/* 删除课程 */
router.delete('/:id', courseshandle.deletecourses);
/* 更新课程数据 */
router.put('/:id', courseshandle.updatecourses);

module.exports = router;